package lt.ntec.danblog.server.blog.model.objectify;

import java.util.Set;

import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;

import lt.ntec.danblog.server.core.model.Tag;
import lt.ntec.danblog.server.core.model.Taggable;
import com.google.appengine.api.datastore.Key;

@PersistenceCapable
public class JDOMockTagImpl implements Tag {

    @Persistent
    private String value;
    @PrimaryKey
    @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
    private Key key;

    public JDOMockTagImpl(String value) {
        this.value = value;
    }

    @Override
    public Long getId() {
        return key.getId();
    }

    @Override
    public int compareTo(Tag o) {
        return this.value.compareTo(o.getValue());
    }

    @Override
    public String getValue() {
        return value;
    }

    @Override
    public Set<? extends Taggable> getEntryList() {
        // TODO Auto-generated method stub
        return null;
    }

    @Override
    public void addParent(Taggable entity) {
        // TODO Auto-generated method stub
    }

    @Override
    public void removeParent(Taggable entity) {
        // TODO Auto-generated method stub
    }
}
